<?php /* Smarty version Smarty-3.1.14, created on 2017-08-18 16:55:35
         compiled from "E:\phpStudy\WWW\zyshop\admin\templates\ads_listedit.html" */ ?>
<?php /*%%SmartyHeaderCode:51225996ab875f1bb5-17308572%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
  'file_dependency' => 
  array (
    '35fd5c45e382fad7684cb39fd24c3d36dc48c854' => 
    array (
      0 => 'E:\\phpStudy\\WWW\\zyshop\\admin\\templates\\ads_listedit.html',
      1 => 1501838904,
      2 => 'file',
    ),
  ),
  'nocache_hash' => '51225996ab875f1bb5-17308572',
  'function' => 
  array (
  ),
  'variables' => 
  array (
    'URL' => 0,
    'list' => 0,
    'position' => 0,
    'position1' => 0,
  ),
  'has_nocache_code' => false,
  'version' => 'Smarty-3.1.14',
  'unifunc' => 'content_5996ab8768de65_92828071',
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_5996ab8768de65_92828071')) {function content_5996ab8768de65_92828071($_smarty_tpl) {?><?php if (!is_callable('smarty_modifier_date_format')) include 'E:\\phpStudy\\WWW\\zyshop\\includes\\libs\\plugins\\modifier.date_format.php';
?><?php echo $_smarty_tpl->getSubTemplate ("header.html", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, null, null, array(), 0);?>

<script type="text/javascript" src="<?php echo $_smarty_tpl->tpl_vars['URL']->value;?>
resource/laydate/laydate.js"></script>
<style>
td {font-weight: bold;}
.firtd {	width: 100px;	padding-right: 10px;	text-align: right;}
input {	width: 350px;}
textarea {	width: 350px;	height: 100px;}
</style>
<body>
<div class="fixed-bar">
  <div class="item-title">
    <h3>编辑广告</h3>
  </div>
</div>
<div class="fixed_bottom">
  <form method="post" action="" id="aspnetForm" name="form1" enctype="multipart/form-data">
  	<input type="hidden" name="ad_id" id="ad_id" value="<?php echo $_smarty_tpl->tpl_vars['list']->value['ad_id'];?>
" />
    <table style=" width:100%;" cellpadding="0" cellspacing="0" class="table tb-type2">
      <tbody>
        <tr>
          <td class="firtd"> 广告名称:</td>
          <td><input type="text" name="ad_name" required value="<?php echo $_smarty_tpl->tpl_vars['list']->value['ad_name'];?>
"> *</td> 
        </tr>
        <tr>
          <td class="firtd"> 广告位置:</td>
          <td><select name="position_id" id="">
            <?php  $_smarty_tpl->tpl_vars['position1'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['position1']->_loop = false;
 $_from = $_smarty_tpl->tpl_vars['position']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['position1']->key => $_smarty_tpl->tpl_vars['position1']->value){
$_smarty_tpl->tpl_vars['position1']->_loop = true;
?>
            <option <?php if ($_smarty_tpl->tpl_vars['list']->value['position_id']==$_smarty_tpl->tpl_vars['position1']->value['position_id']){?> selected="selected" required <?php }?> value="<?php echo $_smarty_tpl->tpl_vars['position1']->value['position_id'];?>
"><?php echo $_smarty_tpl->tpl_vars['position1']->value['position_name'];?>
</option>
            <?php } ?>
            </select></td>
        </tr>
        <tr>
          <td class="firtd"> 开始日期:</td>
          <td><input type="text" name="start_time" id="start_time" required value="<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['list']->value['start_time'],'%Y-%m-%d %H:%M:%S');?>
"> *</td>
        </tr>
        <tr>
          <td class="firtd"> 结束日期:</td>
          <td><input type="text" name="end_time" id="end_time" required value="<?php echo smarty_modifier_date_format($_smarty_tpl->tpl_vars['list']->value['end_time'],'%Y-%m-%d %H:%M:%S');?>
"> *</td>
        </tr>
        <tr>
          <td class="firtd"> 广告链接:</td>
          <td><input type="text" name="ad_link" value="<?php echo $_smarty_tpl->tpl_vars['list']->value['ad_link'];?>
"></td>
        </tr>
        <tr>
          <td class="firtd"> 上传广告图片:</td>
          <td><input style="width:150px;" type="file" name="ad_picture"><?php if ($_smarty_tpl->tpl_vars['list']->value['ad_code']){?><img width="100px;" src="<?php if (!strstr($_smarty_tpl->tpl_vars['list']->value['ad_code'],'http')){?>../<?php }?><?php echo $_smarty_tpl->tpl_vars['list']->value['ad_code'];?>
" /><?php }?></td>
        </tr>
        <tr>
          <td class="firtd"> 或图片网址:</td>
          <td><input type="text" name="ad_code" value="<?php echo $_smarty_tpl->tpl_vars['list']->value['ad_code'];?>
"></td>
        </tr>
        <tr>
          <td class="firtd"> 是否开启:</td>
          <td>
            <input style="width:30px;" type="radio" name="enabled" value="1" <?php if ($_smarty_tpl->tpl_vars['list']->value['enabled']==1){?> checked="checked" <?php }?>>开启
            <input style="width:30px;" type="radio" name="enabled" value="0" <?php if ($_smarty_tpl->tpl_vars['list']->value['enabled']==0){?> checked="checked" <?php }?>>关闭
          </td>
        </tr>
        <tr>
          <td class="firtd"> 排序:</td>
          <td>
            <input type="text" name="sort_id" value="<?php echo $_smarty_tpl->tpl_vars['list']->value['sort_id'];?>
">
          </td>
        </tr>
        <tr>
          <td class="firtd"> H5链接:</td>
          <td><input type="text" name="link_h5" value="<?php echo $_smarty_tpl->tpl_vars['list']->value['link_h5'];?>
"></td>
        </tr>
        <tr>
          <td class="firtd"> IOS链接:</td>
          <td><input type="text" name="link_ios" value="<?php echo $_smarty_tpl->tpl_vars['list']->value['link_ios'];?>
"></td>
        </tr>
        <tr>
          <td class="firtd"> Android链接:</td>
          <td><input type="text" name="link_android" value="<?php echo $_smarty_tpl->tpl_vars['list']->value['link_android'];?>
"></td>
        </tr>
        <tr>
          <td class="style1">&nbsp;</td>
          <td>
              <a href="JavaScript:void(0);" class="btn" onclick="reset()"><span>重置</span></a>
              <a href="JavaScript:void(0);" class="btn" onclick="$('#tj').click()"><span>确认提交</span></a>
          </td>
        </tr>
      </tbody>
    </table>
    <input type="reset" id="cz" style="display: none;">
    <input type="submit" id="tj" style="display:none;";>
  </form>
</div>
</body>

<script>
// 重置方法
function reset(){
	$('input').val('');
	$('textarea').text('');
	$('select').val('');
}
//选择时间
laydate({
  elem: '#start_time', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
  event: 'focus', //响应事件。如果没有传入event，则按照默认的click
  format: 'YYYY-MM-DD hh:mm:ss', //日期格式
  istime: true, //是否开启时间选择
  isclear: true, //是否显示清空
  istoday: true, //是否显示今天
  issure: true, //是否显示确认
  festival: true, //是否显示节日
  min: '1900-01-01 00:00:00', //最小日期
  max: '2099-12-31 23:59:59', //最大日期
  fixed: true, //是否固定在可视区域
});
laydate({
  elem: '#end_time', //目标元素。由于laydate.js封装了一个轻量级的选择器引擎，因此elem还允许你传入class、tag但必须按照这种方式 '#id .class'
  event: 'focus', //响应事件。如果没有传入event，则按照默认的click
  format: 'YYYY-MM-DD hh:mm:ss', //日期格式
  istime: true, //是否开启时间选择
  isclear: true, //是否显示清空
  istoday: true, //是否显示今天
  issure: true, //是否显示确认
  festival: true, //是否显示节日
  min: '1900-01-01 00:00:00', //最小日期
  max: '2099-12-31 23:59:59', //最大日期
  fixed: true, //是否固定在可视区域
});

</script>
</html><?php }} ?>